<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Home_controller extends MX_Controller {

    function __construct() {
        parent::__construct();
        $this->load->helper('form');
        $this->load->library('tank_auth');
        $this->load->library('permissions');
    }

    function index() {
        if (!$this->tank_auth->is_logged_in()) {
            redirect(base_cms() . 'login');
        } else {
            $v_dados['user_id'] = $this->tank_auth->get_user_id();
            $v_dados['username'] = $this->tank_auth->get_username();
            $v_dados['menuLinks'] = $this->permissions->monta_menu(); // montar menu superior
            $this->parser->parse_cms('inicial_view', $v_dados);
        }
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */